package o;

import java.util.Arrays;

public final class amv {
    private long[] ˋ;
    private int ˏ;

    public amv() {
        this(32);
    }

    public amv(int i) {
        this.ˋ = new long[i];
    }

    public void ˋ(long j) {
        if (this.ˏ == this.ˋ.length) {
            this.ˋ = Arrays.copyOf(this.ˋ, this.ˏ * 2);
        }
        long[] jArr = this.ˋ;
        int i = this.ˏ;
        this.ˏ = i + 1;
        jArr[i] = j;
    }

    public long ˏ(int i) {
        if (i >= 0 && i < this.ˏ) {
            return this.ˋ[i];
        }
        throw new IndexOutOfBoundsException("Invalid index " + i + ", size is " + this.ˏ);
    }

    public int ˊ() {
        return this.ˏ;
    }

    public long[] ˏ() {
        return Arrays.copyOf(this.ˋ, this.ˏ);
    }
}
